<template>
    <el-dialog
        title="选择工单"
        :visible.sync="dialogVisible"
        width="85%"
        :before-close="handleClose"
        :close-on-click-modal="false"
        @close="close"
        class="addProjectBudgetDialog"
    >
        <el-form
            :inline="true"
            :model="formSearch"
            class="form-inline"
            label-position="right"
            label-width="100px"
            size="small"
        >
            <el-form-item v-for="item in formConfig" :key="item.label" :label="`${item.label}：`" size="small">
                <el-input
                    clearable
                    v-model="formSearch[item.prop]"
                    :placeholder="item.label"
                    style="width: 190px"
                    size="small"
                ></el-input>
            </el-form-item>
            <el-button type="primary" @click="searchHttp" size="small">搜索</el-button>
            <br />
        </el-form>
        <table-template
            :data="orderTableData"
            :formSearch="formSearch"
            :config="orderTableConfig"
            :currentRow.sync="currentRow"
            :pagination.sync="ordersPager"
            @searchHttp="initOrders"
        ></table-template>
        <div class="select-item-row">
            <el-button class="select-btn" type="primary" @click="$emit('choose', currentRow)">选择</el-button>
        </div>
    </el-dialog>
</template>

<script>
import AddProjectBudgetDialog from './AddProjectBudgetDialog';
export default AddProjectBudgetDialog;
</script>
<style lang="less" scoped>
@import './AddProjectBudgetDialog.less';
</style>
